<?php
/**
 * Description of class
 *
 * @author ww
 */
class TaskFormFacade {

    private $strategy;
    private $context;
    
    public function __construct(RequestContext $context) {
        $this->context = $context;
    }
    
    public function setStepStrategy(AStepStrategy $step) {
        $this->strategy = $step;
    }

    
    public function buildForm() {
        $this->strategy->setContext($this->context);
        $this->strategy->init();
        return $this->strategy->getHTML();
    }
    
    public function submit_form(&$data, &$scope) {
         
        $this->strategy->setContext($this->context);
        return $this->strategy->submit_form($data, $scope);
    }
    public function validate_form(&$data, &$scope) {
         
        $this->strategy->setContext($this->context);
        return $this->strategy->validate_form($data, $scope);
    }
}

?>
